<template>
  <div class="right-list-test-container">
    <RightList :list="list" @selected="handleSelected"></RightList>
  </div>
</template>

<script>
import "@/styles/global.less";
import RightList from "./RightList";

export default {
  name: "right-list-test",
  components: {
    RightList,
  },
  data() {
    return {
      list: [
        { name: "a", isSelect: false },
        { name: "b", isSelect: false },
        {
          name: "c",
          isSelect: true,
          children: [
            { name: "c-1", isSelect: false },
            {
              name: "c-2",
              isSelect: true,
              children: [
                { name: "c-2-1", isSelect: false },
                { name: "c-2-2", isSelect: true },
                { name: "c-2-3", isSelect: false },
              ],
            },
            { name: "c-3", isSelect: false },
          ],
        },
        { name: "d", isSelect: false },
      ],
    };
  },
  methods: {
    handleSelected(data) {
      console.log(data);
    },
  },
};
</script>

<style scoped>
</style>